package site.microkang.house.scheduler;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import site.microkang.house.external.publicity.GovPublicityPlatformHttpService;

/**
 * 住房公示信息定时器
 * @author liukang
 * @date 2021/3/17 12:59
 */
@Component
public class HouseProjectScheduler {
    @Autowired
    private GovPublicityPlatformHttpService govPublicityPlatformHttpService;

    @Scheduled(cron = "0 0 0/4 * * ?")
    public void houseProjectListTask() {
        try {
            govPublicityPlatformHttpService.getHouseProjectList();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
